<?php

namespace Common\Model;

/**
 * Description of HotelAuthorityModel
 * 
 * @author songanwei
 * @date 2015-12-31 
 */
class HotelAuthorityModel extends BaseModel {

    protected $trueTableName = 'tb_hotel_authority';

    /**
     * 返回所有数据
     * @modify songanwei 2016-01-04
     * @return type
     */
    public function getAll() {
        return $this->select();
    }

    /**
     * 返回客栈标签权限数据
     * @modify songanwei 2016-01-04
     * @return type
     */
    public function getAllByLabel($labelId) {
        return $this->where(array('authoritylabel_id' => $labelId))->select();
    }

    /**
     * 返回默认权限的数据
     * @modify songanwei 2016-01-15
     * @param integer $default  默认值1
     */
    public function getInfosByDefault($default = 1) {
        return $this->where(array('default' => $default))->select();
    }

}
